home *** CD-ROM | disk | FTP | other *** search
/ Champak 26 (Anniversary Edition) / Volume 26 [Anniversary Edition] - JOGO DISK .iso / Fight / fightingschool.swf / scripts / frame_267 / PlaceObject2_197_62 / CLIPACTIONRECORD onClipEvent(keyDown).as < prev    next >
Text File  |  2006-06-09  |  3KB  |  93 lines

  1. onClipEvent(keyDown){
  2.    if(_root.PAUSE == false)
  3.    {
  4.       if(ACTION == true)
  5.       {
  6.          if(ATT == false)
  7.          {
  8.             if(klp == false and JMP == false and moving == false)
  9.             {
  10.                if(Key.isDown(Key.DOWN))
  11.                {
  12.                   klp = true;
  13.                   klr = false;
  14.                   if(_root.SP >= 100)
  15.                   {
  16.                      _root.b1.plyr1.gotoAndPlay("spwait");
  17.                      ATT = true;
  18.                      moving = false;
  19.                      _root.PAUSE = true;
  20.                      ACTION = false;
  21.                      _root.bbg.play();
  22.                   }
  23.                }
  24.             }
  25.             if(akp == false)
  26.             {
  27.                if(Key.isDown(Key.SPACE))
  28.                {
  29.                   akp = true;
  30.                   akr = false;
  31.                   if(JMP == true)
  32.                   {
  33.                      this.plyr1.gotoAndPlay("jatt");
  34.                      ATT = true;
  35.                      HITcnt = 0;
  36.                   }
  37.                   else
  38.                   {
  39.                      if(HITcnt < 2)
  40.                      {
  41.                         this.plyr1.gotoAndPlay("att");
  42.                      }
  43.                      else
  44.                      {
  45.                         this.plyr1.gotoAndPlay("pow_att");
  46.                      }
  47.                      ATT = true;
  48.                   }
  49.                }
  50.             }
  51.             if(ATT == false and JMP == false)
  52.             {
  53.                if(Key.isDown(Key.UP))
  54.                {
  55.                   jpp = true;
  56.                   jpr = false;
  57.                   jump.ACTION = true;
  58.                   jump.DIR = moving;
  59.                   JMP = true;
  60.                }
  61.             }
  62.             if(moving == false and JMP == false)
  63.             {
  64.                if(Key.isDown(Key.RIGHT))
  65.                {
  66.                   rkp = true;
  67.                   rkr = false;
  68.                   moving = "RIGHT";
  69.                   this.gotoAndPlay("w_r");
  70.                   DIR = "RIGHT";
  71.                }
  72.                else if(Key.isDown(Key.LEFT))
  73.                {
  74.                   lkp = true;
  75.                   lkr = false;
  76.                   moving = "LEFT";
  77.                   this.gotoAndPlay("w_l");
  78.                   DIR = "LEFT";
  79.                }
  80.             }
  81.          }
  82.          if(Key.isDown(Key.RIGHT) and Key.isDown(Key.LEFT))
  83.          {
  84.             moving = false;
  85.             rkp = true;
  86.             rkr = false;
  87.             lkp = true;
  88.             lkr = false;
  89.          }
  90.       }
  91.    }
  92. }
  93.